﻿@model rosata.Controllers.ContattiController.SendMailDto

@Scripts.Render("~/bundles/jqueryval")

@using (Ajax.BeginForm("SendMail", "Contatti", new AjaxOptions
    {
        UpdateTargetId = "divOutputLogin",
        HttpMethod = "POST",
        InsertionMode = InsertionMode.Replace
    }, new { id = "contact-form" }))
    {
        <div class="row">
            <div class="grid_6">
                <label class="name">
                    @Html.TextBoxFor(model => model.Nome, new { placeholder = "Nome:", id = "txtSendMailNome" })
                    @Html.ValidationMessageFor(model=>model.Nome, "", new {@class="lblErrore"})<br/><br/>
                    <span class="empty-message">*campo richiesto.</span>
                    <span class="error-message">*nome non valido.</span>
                </label>
            </div>
            <div class="grid_6">
                <label class="email">
                    @Html.TextBoxFor(model => model.Email, new { placeholder = "Email:", id = "txtSendMailEmail" })
                    @Html.ValidationMessageFor(model=>model.Email, "", new {@class="lblErrore"})<br/><br/>
                    <span class="empty-message">*campo richiesto.</span>
                    <span class="error-message">*formato email non valido.</span>
                </label>
            </div>
        </div>
        <label class="message">
            @*<textarea placeholder="Messaggio:"></textarea>*@
            @Html.TextAreaFor(model => model.Messaggio, new { placeholder = "Messaggio:", id = "txtSendMailMessaggio    " })
            @Html.ValidationMessageFor(model=>model.Messaggio, "", new {@class="lblErrore"})<br/><br/>
            <span class="empty-message">*Campo richiesto.</span>
            <span class="error-message">*Il messaggio è troppo corto.</span>
        </label>
        <div class="form_btns">
            <!-- <a href="#" data-type="reset" class="more_btn2">Clear</a> -->
            @*<a href="#" data-type="submit" class="more_btn2">Invia messaggio</a>*@
            <input type="submit" value="Invia Messaggio"/>
        </div> 
    }
    
<div id="divOutputLogin">
    
</div>